<!--%import("css/form.css")-->
<!--#include("ModuleHeader.html")-->

<!--// Load Javascript Plugin (Color Picker) -->
{@Context::loadJavascriptPlugin('ui.colorpicker')}

<!--%import("js/ad_admin.js")-->
<!--%import("js/module.js")-->

<form action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, insert_module)" enctype="multipart/form-data" id="fo_insert_module">
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
<!--@if($logged_info->is_admin!='Y')-->
<input type="hidden" name="mid" value="{$module_info->mid}" />
<!--@end-->

<table cellspacing="0" class="insertTable">
<caption><strong class="required">*</strong> <strong>: {$lang->is_required}</strong></caption>
<tbody>
<tr>
	<th colspan="2" class="title">{$lang->module_info}</th>
</tr>
<!--@if($logged_info->is_admin ==  'Y')-->
<tr>
	<th scope="row"><span class="required">*</span> {$lang->mid}</th>
	<td><input type="text" name="mid" value="{$module_info->mid}" class="inputTextbox w200" /><!--@if($config->use_help == 'Y')--> <a href="#" onclick="alert('{$lang->help_mid}');return false" class="buttonSet buttonInfo" title="{$lang->cmd_view_help_ballon}"><span>{nl2br($lang->help_mid)}</span></a><!--@end--></td>
</tr>
<!--@end-->
<tr>
	<th scope="row"><div>{$lang->module_category}</div></th>
	<td>
		<select name="module_category_srl" class="inputSelect">
		  <option value="0">{$lang->notuse}</option>
		  <!--@foreach($module_category as $key => $val)-->
		  <option value="{$key}" <!--@if($module_info->module_category_srl==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
		  <!--@end-->
		</select>
		<!--@if($config->use_help == 'Y')--> <a href="#" onclick="alert('{$lang->help_module_category}');return false" class="buttonSet buttonInfo" title="{$lang->cmd_view_help_ballon}"><span>{nl2br($lang->help_module_category)}</span></a><!--@end-->
		</td>
	</tr>
<tr>
	<th scope="row"><div><span class="required">*</span> {$lang->browser_title}</div></th>
	<td>
		<input type="text" name="browser_title" value="{htmlspecialchars($module_info->browser_title)}"  class="inputTextbox w200" id="browser_title"/>
		<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','browser_title')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting" title="{$lang->cmd_find_langcode}"><span>{$lang->cmd_find_langcode}</span></a> 			<!--@if($config->use_help == 'Y')--> <a href="#" onclick="alert('{$lang->help_browser_title}');return false" class="buttonSet buttonInfo" title="{$lang->cmd_view_help_ballon}"><span>{nl2br($lang->browser_title)}</span></a><!--@end-->
	</td>
</tr>
<tr>
	<th scope="row"><div>{$lang->layout}</div></th>
	<td>
		<select name="layout_srl" class="inputSelect">
			<option value="0">{$lang->notuse}</option>
			<!--@foreach($layout_list as $key => $val)-->
			<option value="{$val->layout_srl}" <!--@if($module_info->layout_srl==$val->layout_srl)-->selected="selected"<!--@end-->>{$val->title} ({$val->layout})</option>
			<!--@end-->
		</select>
	</td>
</tr>
<tr>
	<th scope="row"><div><span class="required">*</span> {$lang->skin}</div></th>
	<td>
		<select name="skin" class="inputSelect">
			<!--@foreach($skin_list as $key=>$val)-->
			<option value="{$key}" <!--@if($module_info->skin==$key ||(!$module_info->skin && $key=='xe_default'))-->selected="selected"<!--@end-->>{$val->title}</option>
			<!--@end-->
			</select>
	</td>
</tr>
<tr>
	<th scope="row" colspan="2" class="title"><div>{$lang->cmd_setup}</div></th>
</tr>
<tr>
	<th><span class="required">*</span> {$lang->ad_type}</th>
	<td>
		<select name="ad_type"<!--@if($module_info->ad_type)--> disabled="disabeld"<!--@end--> class="inputSelect">
			<option value="text">{$lang->linead}</option>
			<option value="image"<!--@if($module_info->ad_type == 'image')--> selected="selected"<!--@end-->>{$lang->image_banner}</option>
			<option value="movie"<!--@if($module_info->ad_type == 'movie')--> selected="selected"<!--@end-->>{$lang->movie_banner}</option>
			<option value="flash"<!--@if($module_info->ad_type == 'flash')--> selected="selected"<!--@end-->>{$lang->flash_banner}</option>
		</select>
		<!--@if($module_info->ad_type)--><input type="hidden" name="ad_type" value="{$module_info->ad_type}" /><!--@end-->

		<p><!--@if(!$module_info->ad_type)-->{$lang->about_ad_type}<!--@else-->{$lang->about_ad_type2}<!--@end--></p>
		</td>
</tr>
<tr>
	<th>{$lang->ad_time}</th>
	<td>
		<input type="checkbox" name="use_time" id="use_time" value="Y"<!--@if($module_info->use_time == 'Y')--> checked="checked"<!--@end-->/><label for="use_time"><strong>{$lang->use}</strong></label>
		[{$lang->about_ad_time}]
	</td>
</tr>
<tr>
	<th>{$lang->ad_option}</th>
	<td>
		<input type="checkbox" name="use_option" id="use_option" value="Y"<!--@if($module_info->use_option && $module_info->use_option != 'N')--> checked="checked"<!--@end-->/><label for="use_option"><strong>{$lang->use}</strong></label>
		[{$lang->about_ad_option}]
	</td>
</tr>
<tr>
	<th>{$lang->textcolor}</th>
	<td>
		<input type="checkbox" name="use_color" id="use_color" value="Y"<!--@if($module_info->use_color == 'Y')--> checked="checked"<!--@end-->/><label for="use_color"><strong>{$lang->use}</strong></label> [{$lang->about_textColor_feature}]
	</td>
</tr>
<tr>
	<th>{$lang->bgcolor}</th>
	<td>
		<input type="checkbox" name="use_bgcolor" id="use_bgcolor" value="Y"<!--@if($module_info->use_bgcolor == 'Y')--> checked="checked"<!--@end-->/><label for="use_bgcolor"><strong>{$lang->use}</strong></label> [{$lang->about_bgColor_feature}]
	</td>
</tr>
<tr>
	<th><span class="required">*</span> {$lang->ad_point}</th>
	<td>
		<!--@if($module_info->use_time == 'Y')--><input type="text" name="ad_point_rate" value="{$module_info->ad_point_rate}" class="inputTextbox w40" /> {$lang->hourly} <!--@end--><input type="text" name="ad_point" value="{$module_info->ad_point}" class="inputTextbox w40" /> {$lang->point}
</tr>
<tr>
	<th><span class="required">*</span> {$lang->highlight_point}</th>
	<td>
		<input type="text" name="highlight_point" value="{$module_info->highlight_point}" class="inputTextbox w40" /> {$lang->point}<!--@if($module_info->use_option && $module_info->use_option != 'N')--> <input type="checkbox" name="each_highlight_point" id="each_highlight_point" value="Y"<!--@if($module_info->each_highlight_point != 'N')--> checked="checked"<!--@end--> /><label for="each_highlight_point">{$lang->about_each_highlight_point}</label><!--@end-->
</tr>
<!--@if($module_info->use_time == 'Y')-->
<tr>
	<th><span class="required">*</span> {$lang->ad_time_range}</th>
	<td>
		<input type="hidden" id="hidAdTimeRange" name="ad_time_range" value="{$module_info->ad_time_range}" />
		<select id="selAdTimeRange" name="_ad_time_range" multiple="multiple" size="1" class="inputList w80"></select>
		<br />
		<br />
		<input type="text" name="_ad_time" class="inputTextbox w40" /> {$lang->time_word['hour']}
		<span class="buttonAction actionBlue"><button type="button" onclick="doInsertAdTime()">{$lang->cmd_insert}</button></span>
		<span class="buttonAction actionWhite"><button type="button" onclick="doDeleteAdTime()">{$lang->cmd_delete}</button></span>


		<div class="aboutText">
		{$lang->about_ad_time_range}
		</div>
	</td>
</tr>
<!--@end-->
<!--@if($module_info->use_color == 'Y')-->
<tr>
	<th><span class="required">*</span> {$lang->allowed_text_color}</th>
	<td>
		<input type="hidden" id="hiddenColorRange" name="ad_color_range" value="{$module_info->ad_color_range}" />
		<select id="selColorRange" name="_ad_color_range" multiple="multiple" size="1" class="inputList w80"></select>
		<br />
		<br />
		<input type="text" id="tColor" name="ad_color" value="" class="inputTextbox color-indicator" />

		<span class="buttonAction actionBlue"><button type="button" onclick="doInsertAdColor(jQuery('#tColor').val(), document.getElementById('selColorRange'))">{$lang->cmd_insert}</button></span>
		<span class="buttonAction actionWhite"><button type="button" onclick="doDeleteAdColor()">{$lang->cmd_delete}</button></span>

		<p>{$lang->about_ad_color_range}</p>
	</td>
</tr>
<!--@end-->
<!--@if($module_info->use_bgcolor == 'Y')-->
<tr>
	<th><span class="required">*</span> {$lang->allowed_bg_color}</th>
	<td>
		<input type="hidden" name="ad_bgcolor_range" value="{$module_info->ad_bgcolor_range}" />
		<select name="_ad_bgcolor_range" multiple="multiple" size="1" class="inputList w200"></select>
		<br />
		<br />
		<input type="text" name="ad_bgcolor" value="" class="inputTextbox color-indicator" />

		<span class="button black strong"><button type="button" onclick="doInsertAdBgColor()">{$lang->cmd_insert}</button></span>
		<span class="button"><button type="button" onclick="doDeleteAdBgColor()">{$lang->cmd_delete}</button></span>
		<p>{$lang->about_ad_bgrange}</p>
	</td>
</tr>
<!--@end-->
<tr>
	<th><div>{$lang->ad_limit}</div></th>
	<td>
		<input type="text" name="ad_limit" value="{$module_info->ad_limit}" class="inputTextbox" style="width:44px" /> 개
		<p>{$lang->about_ad_limit}</p>
	</td>
</tr>
<tr>
	<th scope="row"><div>{$lang->daily_limit}</div></th>
	<td>
		<input type="text" name="daily_limit" value="{$module_info->daily_limit}" class="inputTextbox" style="width:44px" /> 개
		<p>{$lang->about_daily_limit}</p>
	</td>
</tr>
<tr>
	<th scope="row"><div>{$lang->description}</div></th>
	<td>
		<textarea name="description" class="inputTextareabox fullWidth">{htmlspecialchars($module_info->description)}</textarea>
		<p>{$lang->about_description}</p>
	</td>
</tr>
<tr>
	<th scope="row"><div>{$lang->header_text}</div></th>
	<td>
		<textarea name="header_text" class="inputTextareabox fullWidth" id="header_text">{htmlspecialchars($module_info->header_text)}</textarea>
		<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','header_text')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
		<p>{$lang->about_header_text}</p>
	</td>
</tr>
<tr>
	<th scope="row"><div>{$lang->footer_text}</div></th>
	<td>
		<textarea name="footer_text" class="inputTextareabox fullWidth" id="footer_text">{htmlspecialchars($module_info->footer_text)}</textarea>
		<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','footer_text')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
		<p>{$lang->about_footer_text}</p>
	</td>
</tr>
<tr>
	<th colspan="2" class="button">
		<span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
		<a href="{getUrl('act','dispAdAdminModuleList','module_srl','')}" class="button"><span>{$lang->cmd_back}</span></a>
	</th>
</tr>
</tbody>
</table>
</form>